# 已知list1=[1,2,3,4,5,6],请通过两种方法实现，使用list1=[6,5,4,3,2,1]
# 方法一：reverse函数
list=[1,2,3,4,5,6]
list.reverse()
print(list)

# 方法二：双指针
list=[1,2,3,4,5,6]
i = 0
j = 5

while i <= j:
    temp = list[i]
    list[i] = list[j]
    list[j] = temp
    i += 1
    j -= 1
print(list)


